Update API documentation for daily papers#2065
Conversation
Add params documentation for /api/daily_papers
|
|
||
| Other keywords that are supported: | ||
|
|
||
| 1. `limit` - the number of pages returned |
There was a problem hiding this comment.
as in length of the paper or number of papers returned?
There was a problem hiding this comment.
Oops, yeah that's what it should say.
| 1. `limit` - the number of pages returned | ||
| 2. `p` - the page number, for paging through results | ||
| 3. `submitter` - to filter by summitter | ||
| 4. `date`, `week`, `month` - for filtering by date range |
There was a problem hiding this comment.
| 4. `date`, `week`, `month` - for filtering by date range | |
| 4. `date`, `week`, `month` - for filtering by date range |
of the paper release dates?
There was a problem hiding this comment.
I didn't create the API, and it's not clear to me from the openapi docs. It could be either the paper release date, or the day it was featured on Daily Papers.
There was a problem hiding this comment.
According to DeepWiki
The date parameter refers to when the paper was included in the daily papers on the Hub, not when it was written or originally submitted to arXiv. hf_api.py:1527-1528
This is confirmed by the PaperInfo dataclass, which has two distinct date fields:
published_at: The date the paper was published (on arXiv) hf_api.py:1513-1514
submitted_at: The date the paper appeared in daily papers on the Hub hf_api.py:1527-1528|
I will update it according to that.
There was a problem hiding this comment.
I can confirm it's the publishedAt property (internal link). Somewhat related PR: #1878.
| 2. `p` - the page number, for paging through results | ||
| 3. `submitter` - to filter by summitter | ||
| 4. `date`, `week`, `month` - for filtering by date range | ||
| 5. `sort` - to specify how results are sorted. |
There was a problem hiding this comment.
how can they be sorted? by date or?
There was a problem hiding this comment.
From the openapi docs:
sortCopy link to sort
enum
default:
"publishedAt"
publishedAt
trending
There was a problem hiding this comment.
I updated this as well
|
|
||
| Search the daily papers by keyword: | ||
|
|
||
| 1. `q` - the keyword to search |
There was a problem hiding this comment.
this seems standalone so no need to number I think
Co-authored-by: Merve Noyan <merve@huggingface.co>
Clarify the default sorting behavior and options for the API.
Clarified filtering parameters for date and sorting in API documentation.
merveenoyan
left a comment
There was a problem hiding this comment.
lgtm but would like @AK391 to review too just in case
Co-authored-by: Merve Noyan <merve@huggingface.co>
Co-authored-by: Merve Noyan <merve@huggingface.co>
|
Bump on this. Any update? |
pcuenca
left a comment
There was a problem hiding this comment.
Looks good to me. We can optionally provide examples of weekly and monthly filters, see this comment for reference. But I'd suggest we merge this now and iterate in a new PR.
Good to know about! Yes makes sense, I might be able to open up a follow-up PR. I agree, merge this so it doesn't get forgotten about, since currently the docs are pretty bare. |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
This PR documents the parameters for the
/api/daily_papers.This is just a first quick pass. Let me know if you'll take a PR to improve these docs, and any clean-up or edits you'd like me to do.
Thanks @AK391 for pointing me to these docs.